package org.server;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import com.gang.core.pluginMgr.PluginManager;

/**
 * Hello world!
 *
 */
public class Server 
{
    public static void main( String[] args ) throws IOException
    {
    	PluginManager m = new PluginManager();
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		m.loadPlugin("myplugin");
		m.doSome("myplugin");
		String cmd = reader.readLine();
		while (!cmd.equals("bye")) {
			String pluginName=cmd.split(" ")[1];
			if (cmd.startsWith("do")) {
				m.doSome(pluginName);
			}
			if (cmd.startsWith("load")) {
				m.loadPlugin(pluginName);
			}
			if (cmd.startsWith("unload")) {
				m.unload(pluginName);
			}
			cmd=reader.readLine();
		}
    }
}
